#include "TcpServer.hpp"
#include <memory>


void Usage(const std::string& proc)
{
    std::cout << "格式：" << proc << " port" << std::endl;
}

int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        Usage(argv[1]);
        return usage_err;
    }
    
    std::unique_ptr<TcpServer> tsvr = std::make_unique<TcpServer>(std::stoi(argv[1]));
    tsvr->Init();
    tsvr->Start();
    
    return 0;
}